home *** CD-ROM | disk | FTP | other *** search
- Path: keats.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++
- Subject: Re: C/C++ knocks the crap out of Ada
- Date: 15 Mar 1996 20:21:27 -0800
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4idfk7INNngh@keats.ugrad.cs.ubc.ca>
- References: <00001a73+00002504@msn.com> <4icja9$1r92@saba.info.ucla.edu> <4ictacINN5gk@mayne.ugrad.cs.ubc.ca> <4idagc$ldi@saba.info.ucla.edu>
- NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
-
- In article <4idagc$ldi@saba.info.ucla.edu>,
- Jay Martin <jmartin@cs.ucla.edu> wrote:
- >c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku) writes:
- >
- >>>Its stupid to bring in two tools with two more
- >>>"languages" to do something trivial that takes a page of normal code.
- >
- >>Your last sentence is an example of obsolete thinking....
- >
- >Every tool, language, library, etc, that you use on a project
- >increases its complexity and maintanance costs. The people who have
- >to maintain or reuse the code must know all the tools and all the
- >languages and tools must talk together correctly. Suppose you want to
- >do sorting, COBOL is the best for that or logic: PROLOG, calculations:
- >FORTRAN, pretty soon you will have problems getting all the pieces
- >talking together and anyone to work on it. Thus, the savings gained
- >by the tool must offset the pain of using the tool. Forcing expertise
- >in yacc parsing for a page of code is not worth it, IMHO.
- >
- >In a recent case using a yacc parser structure made the code harder to
- >use when converting to a GUI interface or trying to reuse parts of it.
-
- Are you sure that the yacc was at fault here? How would it have helped the
- conversion had a hand-coded parser been used? This sound like a moot case.
-
- Why couldn't you keep the parser and add a GUI?
-
- Clearly, not all uses of yacc represent good design. Some people write yacc
- files with actions that are simply huge, instead of moving the code to
- well defined modules. You may have suffered from the case of the monolithic
- yacc spec.
-
- Poor yacc practice can lead to many mistakes. For example, sometimes the
- grammar will require you to write two similar productions to do almost the same
- thing. For example, a production like:
-
- foo -> a b ( c | d ) e { action }
-
- meaning that c or d can occupy the place, has to be split into two. And so does
- the action, of course. If the action is more than just two or three lines that
- call an external function (such as something that builds a node), you have to
- repeat all the code for both expansions of foo, and thereafter maintain two
- separate copies in parallel. Messy!
-
- Anyway, I'm sure that some other newsgroups are much more appropriate to
- yacking about this sort of stuff.
- --
-
-